package com.techie.mdm.appbar.showcase;

import jdesktop.appbar.win32.WAppBar;

/**
 * The model underlying the appbar reference.
 *
 */
public class AppBarBean
{
    String name;
    WAppBar appBar;
    AppBarWindow appBarWindow;

    static public final String APPBARWINDOW = "appBarWindow";
    static public final String APPBAR = "appBar";
    static public final String NAME = "name";


    public AppBarBean(String name)
    {
        this.name = name;
        this.appBar = new WAppBar();
        this.appBarWindow = new AppBarWindow(this);
    }

    public AppBarBean()
    {
        this(nextName());
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public WAppBar getAppBar()
    {
        return appBar;
    }

    public void setAppBar(WAppBar appBar)
    {
        this.appBar = appBar;
    }

    static private int next = 1;
    private static String nextName()
    {
        return "appbar "+next++;
    }

    public AppBarWindow getAppBarWindow()
    {
        return appBarWindow;
    }

    
}
